//
//  URLUtil.swift
//  KJLGT
//
//  Created by jenkin on 2019/8/11.
//  Copyright © 2019年 jenkin. All rights reserved.
//

import Foundation

//************* url **************
let BaseUrl:String = {
    #if DEBUG
    //return "http://192.168.1.162/api/"
    //return "http://192.168.1.123/api/"
    //return "http://192.168.1.51:8081/api/"
    //return "http://dev.coosvc.com/api/"
    return "https://app.dusxss.com/api/"
    #else
    return "https://app.dusxss.com/api/"
    #endif
}()

func API_URL(_ url:String) -> String{
    return BaseUrl + url
}

//获取角标
let APP_Bage_URL:String = API_URL("app/badge")
//app启动参数获取
let APP_Init_URL:String = API_URL("app/init")
//发送验证码
let Send_Code_URL:String = API_URL("login/sendcode")
//验证码登陆
let Login_Code_URL:String = API_URL("login/code")
//密码登陆
let PassWord_Code_URL:String = API_URL("login/password")
//微信登陆
let Login_WX_URL:String = API_URL("login/wx")
//找回密码
let Find_Password_URL:String = API_URL("login/findpassword")
//绑定手机
let Bind_Phone_URL:String = API_URL("login/bindphone")
//绑定微信
let Bind_WX_URL:String = API_URL("login/bindwx")
//身份选择
let User_Chose_URL:String = API_URL("user/role")
//获取用户信息
let User_Info_URL:String = API_URL("user/index")
//修改用户信息
let User_Info_Update_URL:String = API_URL("user/edit")
//上传图片
let Upload_Image_URL:String = API_URL("upload/image")
//上传图片生成缩略图
let Upload_ThumImage_URL:String = API_URL("upload/thumbnail")
//获取任务类型
let LLZ_Task_Type_URL:String = API_URL("tr_task/typeList")

//任务列表
let Task_List_URL:String = API_URL("tp_task/taskList")
//任务数量
let Task_Count_URL:String = API_URL("tp_task/getTaskNum")
//订单
let Task_OrderList_URL:String = API_URL("tp_task_order/taskOrderList")
//订单详情
let Task_OrderDetail_URL:String = API_URL("tp_task_order/taskOrderDetail")

//发布任务参数详情
let Task_Post_Param_URL:String = API_URL("tp_task/postTaskParams")
//发布任务
let Task_Post_URL:String = API_URL("tp_task/postTask")
//任务详情
let Task_Detail_URL:String = API_URL("tp_task/taskDetail")
//任务状态修改
let Task_Statues_Update_URL:String = API_URL("tp_task/changeTaskStatus")
//追加订单
let Task_Add_URL:String = API_URL("tp_task/addTaskOrderNum")
//钱包
let Wallet_URL:String = API_URL("bag/amountlist")
//消息列表
let Message_List_URL:String = API_URL("message/index")
//系统公告
let Notice_List_URL:String = API_URL("notice/index")


//设置新密码
let Set_New_Pass_URL:String = API_URL("user/settingpassword")
//修改密码
let Update_Pass_URL:String = API_URL("user/setpassword")

//banner
let Banner_URL:String = API_URL("banner/index")
//用户账号信息
let User_Account_URL:String = API_URL("user/account")
// 意见反馈
let Advice_URL:String = API_URL("suggest/index")

//获取任务列表条件
let LLZ_Task_Condition:String = API_URL("tr_task/taskListCondition")

//流量主
let LLZ_Task_List_URL:String = API_URL("tr_task/taskList")
//流量主任务详情
let LLZ_Task_Detail_URL:String = API_URL("tr_task/taskDetail")
//订单列表
let LLZ_Order_List_URL:String = API_URL("tr_task_order/taskOrderList")
//订单详情
let LLZ_Order_Detail_URL:String = API_URL("tr_task_order/taskOrderDetail")
//申请任务
let LLZ_Order_Apply_URL:String = API_URL("tr_task_order/applyTaskOrder")
//修改订单状态
let LLZ_OrderStatus_Update_URL:String = API_URL("tr_task_order/changeOrderStatus")
let RWZ_OrderStatus_Update_URL:String = API_URL("tp_task_order/changeOrderStatus")

//微信充值
let WX_Recharge_URL:String = API_URL("recharge/wx")

// 注册协议
let Agreen_Html_URL = "m/contract/index.html"
// 网页地址
let Cash_Html_URL = "m/withdraw/index"
//免责声明
let NoDuty_Html_URL = "/m/contract/disclaimer"
//发单规则
let Public_Order_Html_URL = "m/contract/taskRelease"
//接单声明
let Recive_Order_Html_URL = "m/contract/taskApply"

func Html_URL(_ url:String) -> String{
    return "\(AppModel.share?.m_host ?? "")/\(url)"
}
